package com.xcity.pomelo.response;

import java.util.ArrayList;
import java.util.List;

import com.xcity.db.entity.Player;
import com.xcity.pomelo.push.msg.VisitorInPush.Visitor;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.RESPONSE)
public class VisitorsResponse extends Response {

	private List<Visitor> visitors;
	
	public VisitorsResponse(int serial, List<Player> srcs) {
		super(serial);
		visitors = new ArrayList<Visitor>(srcs.size());
		for (int i = 0; i < srcs.size(); i++) {
			Player src = srcs.get(i);
			Visitor visitor = new Visitor(src);
			visitors.add(visitor);
		}
	}

	public List<Visitor> getVisitors() {
		return visitors;
	}

	public void setVisitors(List<Visitor> visitors) {
		this.visitors = visitors;
	}

}
